import java.applet.Applet; import java.awt.*; import java.awt.event.*; public class Rattad extends Applet implements ActionListener{ int nr=2; TextField tf=new TextField("5"); public Rattad(){ add(tf); tf.addActionListener(this); } public void actionPerformed(ActionEvent e){ nr=Integer.parseInt(tf.getText().trim()); repaint(); } public void paint(Graphics g){ int i=0; while(i